
import { useCounterStore } from '@/stores/counter'
const tokenStore =useCounterStore()
const strtoken =encodeURIComponent(tokenStore.token) 
// const strtoken = '1'

export const sseUrl = {
    meun:`${import.meta.env.VITE_API_URL}/fada/E68891E79A84E5BA94E794A8?token=${strtoken}`,
    video:`${import.meta.env.VITE_API_URL}/fada/E68891E79A84E794B5E8AF9D?token=${strtoken}`,
    sys_notice:`${import.meta.env.VITE_API_URL}/fada/E5B9B3E58FB0E6B688E681AFE9809AE79FA5?token=${strtoken}`,
    jslt:`${import.meta.env.VITE_API_URL}/fada/chat/E5B9B3E58FB0E58DB3E5AE9EE9809AE4BFA1?token=${strtoken}`,
    Ai:`${import.meta.env.VITE_API_URL}/fada/E68891E79A84E699BAE883BDE58AA9E6898B?token=${strtoken}`
};

export function setUrl(val?: string) {
    let url =`${import.meta.env.VITE_API_URL}/fada/${val}?token=${strtoken}`
    return url 
}

export function setUrlParams(val?: string,params?:string) {
    console.log(val);
    
    let url =`${import.meta.env.VITE_API_URL}/fada/${val}?token=${strtoken}&fileName=${params}`
    return url 
}
